package cate.game.role.farm.adventure.msg;

import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBAdventure;
import easy.java.dev.note.NoteField;

public class AdventureSpecialRewardReq implements MsgInput {
    @NoteField("主线关卡id")
    public int tid;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult<Void> passReward = cc.getRole().getFarm().adventure.getSpecialReward(tid);
        if (!passReward.ok()){
            game.notice.message(cc.getRole(), passReward);
        }
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBAdventure.SPECIAL_REWARD_REQ;
    }
}
